﻿namespace Smart.Utils.ExcelDataReader.Core
{
    using System;
    using System.Data;

    internal class XlsWorksheet
    {
        private XlsBiffSimpleValueRecord m_CalcCount = null;
        private XlsBiffSimpleValueRecord m_CalcMode = null;
        private DataTable m_Data = null;
        private uint m_dataOffset = 0;
        private XlsBiffRecord m_Delta = null;
        private XlsBiffDimensions m_Dimensions = null;
        private int m_Index = 0;
        private XlsBiffSimpleValueRecord m_Iteration = null;
        private string m_Name = string.Empty;
        private XlsBiffSimpleValueRecord m_RefMode = null;
        private XlsBiffRecord m_Window2 = null;

        public XlsWorksheet(int index, XlsBiffBoundSheet refSheet)
        {
            this.m_Index = index;
            this.m_Name = refSheet.SheetName;
            this.m_dataOffset = refSheet.StartOffset;
        }

        public XlsBiffSimpleValueRecord CalcCount
        {
            get
            {
                return this.m_CalcCount;
            }
            set
            {
                this.m_CalcCount = value;
            }
        }

        public XlsBiffSimpleValueRecord CalcMode
        {
            get
            {
                return this.m_CalcMode;
            }
            set
            {
                this.m_CalcMode = value;
            }
        }

        public DataTable Data
        {
            get
            {
                return this.m_Data;
            }
            set
            {
                this.m_Data = value;
            }
        }

        public uint DataOffset
        {
            get
            {
                return this.m_dataOffset;
            }
        }

        public XlsBiffRecord Delta
        {
            get
            {
                return this.m_Delta;
            }
            set
            {
                this.m_Delta = value;
            }
        }

        public XlsBiffDimensions Dimensions
        {
            get
            {
                return this.m_Dimensions;
            }
            set
            {
                this.m_Dimensions = value;
            }
        }

        public int Index
        {
            get
            {
                return this.m_Index;
            }
        }

        public XlsBiffSimpleValueRecord Iteration
        {
            get
            {
                return this.m_Iteration;
            }
            set
            {
                this.m_Iteration = value;
            }
        }

        public string Name
        {
            get
            {
                return this.m_Name;
            }
        }

        public XlsBiffSimpleValueRecord RefMode
        {
            get
            {
                return this.m_RefMode;
            }
            set
            {
                this.m_RefMode = value;
            }
        }

        public XlsBiffRecord Window2
        {
            get
            {
                return this.m_Window2;
            }
            set
            {
                this.m_Window2 = value;
            }
        }
    }
}

